package cn.tedu.feign.feign;

import com.ljz.pojo.Item;
import com.ljz.web.utils.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * Created by LJZ.
 * User: UID
 * Date:2020/6/19
 * Time: 15:54
 * To change this template use File | Settings | File Templates.
 */
@FeignClient("item-service")
public interface ItemFeign {
    @GetMapping("/{orderId}")
    JsonResult<List<Item>> getItems(@PathVariable String orderId);

    @PostMapping("/decreaseNumber")
    JsonResult decreaseNumber(@RequestBody List<Item> items);
}
